#ifndef XFormat
#define XFormat
#include "Matrix.h"
namespace XEFMT{
	typedef struct ChunkHeader{
		char	ChunkID[20];
		int		TypeFlag;
		int		DataSize;
		int		DataCount;
	};
	typedef Vector3 VVector;
	typedef Quaternion VQuat;
	typedef struct VVertex{
		short	PointIndex;
		short	Pad;
		float		U;
		float		V;
		char	MatIndex;
		char	Resvered;
		short	Pad2;
	};
	typedef struct VFace{
		short	Wedge0;
		short	Wedge1;
		short	Wedge2;
		char	MatIndex;
		char	AuxMatIndex;
		int		SmoothGingroups;
	};
	typedef struct VMaterial{
		char	MaterialName[64];
		int		TextureIndex;
		int		PolyFlags;
		int		AuxMaterial;
		int		AuxFlags;
		int		LodBias;
		int		LodStyle;
	};
	typedef struct VBones{
		char	Name[64];
		int		Flags;
		int		NumChildren;
		int		ParentIndex;
		VQuat	Orientation;
		VVector	Position;
		int		Length;
		VVector	Size;
	};
	typedef struct VWeights{
		float	Weight;
		int		PointIndex;
		int		BoneIndex;
	};
	typedef struct MeshInfo{
		VVector*	points;
		int			pointsNum;
		VVertex*	vertexs;
		int			vertexsNum;
		VFace*		faces;
		int			facesNum;
		VMaterial*	materials;
		int			materialsNum;
		VBones*		bones;
		int			bonesNum;
		VWeights*	weights;
		int			weightsNum;
	};
	typedef struct Color{
	public:
		float r, g, b, a;
		Color(){
			r = g = b = a = 0.0f;
		}
		Color(float _r, float _g, float _b,float _a){
			r = _r; g = _g; b = _b; a = _a;
		}
	};
	enum LightType{
		PointLight,
		DirectionLight,
		SpotLight
	};
}
#endif